using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;

namespace DataAccess
{
	/// <summary>
	/// A custom serializable dataset containing 
	/// </summary>
	[Serializable()]
	[DesignerCategory("code")]


	/// <summary>Class for handling datasets</summary>  
		public class AmbitosDeclaratoriasData : DataSet
	{
		///
		/// Constants for table and fields mapping
		///
		public const string PAT_AMBITOS_DECLARATORIAS_TABLE = "PAT_AMBITOS_DECLARATORIAS";

		public const string AMD_ID_FIELD = "AMD_ID";
		public const string AMD_NOMBRE_FIELD = "AMD_NOMBRE";
		public const string AMD_CODIGO_FIELD = "AMD_CODIGO";


		protected AmbitosDeclaratoriasData(SerializationInfo info, StreamingContext context)
		{
			//
		}

		public AmbitosDeclaratoriasData()
		{
			BuildDataTables();
		}

		/// <summary>
		/// Creates the following datatables: Localidades
		/// </summary>
		private void BuildDataTables()
		{
			DataTable table;
			DataColumnCollection columns;
			table = new DataTable(PAT_AMBITOS_DECLARATORIAS_TABLE);
			columns = table.Columns;

			columns.Add(AMD_ID_FIELD, typeof (Decimal));
			columns[AMD_ID_FIELD].Caption = @"ID";
			columns.Add(AMD_NOMBRE_FIELD, typeof (String));
			columns[AMD_NOMBRE_FIELD].Caption = @"Nombre";
			columns.Add(AMD_CODIGO_FIELD, typeof (String));
			columns[AMD_CODIGO_FIELD].Caption = @"Codigo";

			this.Tables.Add(table);
		}

		/// <summary>
		/// Add a new row to the table
		/// </summary>
		/// <param name="row">Dataset row
		public void addAmbitosDeclaratorias(DataRow row)
		{
			this.Tables[PAT_AMBITOS_DECLARATORIAS_TABLE].Rows.Add(row);
		}

	}

}